﻿<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<title>英语教学系统</title>
<link rel="stylesheet" type="text/css" href="static/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="static/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="static/css/edua-icons.css">
<link rel="stylesheet" type="text/css" href="static/css/animate.min.css">
<link rel="stylesheet" type="text/css" href="static/css/owl.carousel.css">
<link rel="stylesheet" type="text/css" href="static/css/owl.transitions.css">
<link rel="stylesheet" type="text/css" href="static/css/cubeportfolio.min.css">
<link rel="stylesheet" type="text/css" href="static/css/settings.css">
<link rel="stylesheet" type="text/css" href="static/css/bootsnav.css">
<link rel="stylesheet" type="text/css" href="static/css/style.css">
<link rel="stylesheet" type="text/css" href="static/css/loader.css">
<link rel="icon" href="static/images/favicon.png">

<!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>

<body>
<a href="#" class="scrollToTop"><i class="fa fa-angle-up"></i></a>
<!--Loader-->
<div class="loader">
  <div class="bouncybox">
      <div class="bouncy"></div>
    </div>
</div>

<!--Header-->
<header>
  <nav class="navbar navbar-default navbar-sticky bootsnav">
    <div class="container"> 
       <!-- <div class="search_btn btn_common"><i class="icon-icons185"></i></div> -->
      <div class="navbar-header">
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-menu">
          <i class="fa fa-bars"></i>
        </button>
        <a class="navbar-brand" href="index.html">
        <img src="images/logo.png" class="logo logo-scrolled" alt="">
        </a>
      </div>
      <div class="collapse navbar-collapse" id="navbar-menu">
        <ul class="nav navbar-nav navbar-right" data-in="fadeInDown" data-out="fadeOut">
          <li class="dropdown">
            <a href="t_course.html" >课程介绍</a>
          </li>
          <li >
            <a href="t_course_create.html" >创建课程</a>
          </li>
          <li class="active">
            <a href="t_teacher.html">教师介绍</a>
          </li>
          <li class="dropdown">
            <a href="t_teacher_create.html" >创建老师</a>
          </li>
          <li class="dropdown"><a href="t_blog.html">论坛</a></li>
          <li class="dropdown"><a href="t_resource.html">下载中心</a></li>
          <li><a href="t_resource_create.html">创建下载</a></li>
          <li class="dropdown"><a href="t_contact.html">联系我们</a></li>
        </ul>
      </div>
    </div>   
  </nav>
</header>

<section id="course_all" class="padding-bottom">
  <div class="container">
    <div id="courseList" class="row">
      <div class="col-sm-6 col-md-4">
        <div class="course margin_top wow fadeIn" data-wow-delay="400ms">
          <div class="image bottom25">
            <img src="static/images/courses1.jpg" alt="Course" class="border_radius">
          </div>
          <h3 class="bottom10"><a href="course_detail.html">Accounting Technologies</a></h3>
          <p class="bottom20">We offer the most complete house renovating services in the country, from kitchen design to bathroom remodeling.</p>
          <a class="btn_common yellow border_radius" href="course_detail.html">view details</a>
        </div>
      </div>
      <div class="col-sm-6 col-md-4">
        <div class="course margin_top wow fadeIn" data-wow-delay="500ms">
          <div class="image bottom25">
            <img src="static/images/courses2.jpg" alt="Course" class="border_radius">
          </div>
          <h3 class="bottom10"><a href="course_detail.html">Modern Technologies</a></h3>
          <p class="bottom20">We offer the most complete house renovating services in the country, from kitchen design to bathroom remodeling.</p>
          <a class="btn_common yellow border_radius" href="course_detail.html">view details</a>
        </div>
      </div>
      <div class="col-sm-6 col-md-4">
        <div class="course margin_top wow fadeIn" data-wow-delay="600ms">
          <div class="image bottom25">
            <img src="static/images/courses3.jpg" alt="Course" class="border_radius">
          </div>
          <h3 class="bottom10"><a href="course_detail.html">Modern Languages</a></h3>
          <p class="bottom20">We offer the most complete house renovating services in the country, from kitchen design to bathroom remodeling.</p>
          <a class="btn_common yellow border_radius" href="#.">view details</a>
        </div>
      </div>
      <div class="col-sm-6 col-md-4">
        <div class="course margin_top  wow fadeIn" data-wow-delay="700ms">
          <div class="image bottom25">
            <img src="static/images/courses4.jpg" alt="Course" class="border_radius">
          </div>
          <h3 class="bottom10"><a href="course_detail.html">Computer Technologies</a></h3>
          <p class="bottom20">We offer the most complete house renovating services in the country, from kitchen design to bathroom remodeling.</p>
          <a class="btn_common yellow border_radius" href="course_detail.html">view details</a>
        </div>
      </div>
      <div class="col-sm-6 col-md-4">
        <div class="course margin_top wow fadeIn" data-wow-delay="800ms">
          <div class="image bottom25">
            <img src="static/images/courses5.jpg" alt="Course" class="border_radius">
          </div>
          <h3 class="bottom10"><a href="course_detail.html">Development Studies</a></h3>
          <p class="bottom20">We offer the most complete house renovating services in the country, from kitchen design to bathroom remodeling.</p>
          <a class="btn_common yellow border_radius" href="course_detail.html">view details</a>
        </div>
      </div>
      <div class="col-sm-6 col-md-4">
        <div class="course margin_top wow fadeIn" data-wow-delay="900ms">
          <div class="image bottom25">
            <img src="static/images/courses6.jpg" alt="Course" class="border_radius">
          </div>
          <h3 class="bottom10"> <a href="course_detail.html">Electrical & Electronic</a></h3>
          <p class="bottom20">We offer the most complete house renovating services in the country, from kitchen design to bathroom remodeling.</p>
          <a class="btn_common yellow border_radius" href="course_detail.html">view details</a>
        </div>
      </div>
    </div>
  </div>
</section>


<script src="static/js/jquery-2.2.3.js"></script>
<script src="static/js/bootstrap.min.js"></script>
<script src="static/js/bootsnav.js"></script>
<script src="static/js/jquery.appear.js"></script>
<script src="static/js/jquery-countTo.js"></script>
<script src="static/js/jquery.parallax-1.1.3.js"></script>
<script src="static/js/owl.carousel.min.js"></script>
<script src="static/js/jquery.cubeportfolio.min.js"></script>
<script src="static/js/jquery.themepunch.tools.min.js"></script>
<script src="static/js/jquery.themepunch.revolution.min.js"></script>
<script src="static/js/revolution.extension.layeranimation.min.js"></script>
<script src="static/js/revolution.extension.navigation.min.js"></script>
<script src="static/js/revolution.extension.parallax.min.js"></script>
<script src="static/js/revolution.extension.slideanims.min.js"></script>
<script src="static/js/revolution.extension.video.min.js"></script>
<script src="static/js/wow.min.js"></script>
<script src="static/js/functions.js"></script>
<script type="text/javascript">
	$(function() {
		loadData();
		});
	function loadData() {

		var data = {//传递的数据
				"offset" : 0,
				"limit":100
			};
		$.ajax({
			url : "teacher/getTeachers",//请求的url
			type : "post",//请求方式
			data : JSON.stringify(data),
			dataType : "json",//后台数据返回类型
			contentType:"application/json",
			success : function(data) {//响应成功执行的方法
				res = data.rows;
			console.log(res);
			var html='';
			for(var i=0;i<res.length;i++) {
				html+=	'	<div class="col-sm-6 col-md-4">				'	+
				'	        <div class="course margin_top wow fadeIn" data-wow-delay="400ms">				'	+
				'	          <div class="image bottom25">				'	+
				'	            <img src="'+res[i].pic+'" alt="Course" class="border_radius">				'	+
				'	          </div>				'	+
				'	          <h3 class="bottom10"><a href="javaScript:void(0)">'+res[i].teacherName+'</a></h3>				'	+
				'	          <p class="bottom20">'+ res[i].des+'</p>				'	+
				'	          <a class="btn_common yellow border_radius" href="javaScript:del('+res[i].id+')">删除</a>				'	+
				'	        </div>				'	+
				'	      </div>				'

			}
			$("#courseList").html(html);

			},
			error : function() {//出现异常执行方法
				alert("出现异常啦...");
			}
		});
	}
	function del(id){
		var data ={"id":id}
		$.ajax({
			url : "teacher/delTeacherById",//请求的url
			type : "post",//请求方式
			data : JSON.stringify(data),
			dataType : "json",//后台数据返回类型
			contentType:"application/json",
			success : function(data) {//响应成功执行的方法
				loadData();
			},
			error : function() {//出现异常执行方法
				alert("出现异常啦...");
			}
		});
	}
</script>
</body>
</html>

